<?php

namespace App\Http\Controllers\Api\V1\Traits;


use App\Models\PointLog;

trait PointTrait
{

    public function pointLog($type, $points)
    {
        $res = PointLog::create([
            'user_id' => \Auth::id(),
            'points' => $points,
            'type' => $type,
            'data' => ''
        ]);

        return $res;
    }

}